package com.cloudkinto.vo.role.role;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * @author zhangyy
 * @date 2020/5/29 9:19
 * @description:
 */
@Data
public class RoleAddReq implements Serializable {

    @NotBlank(message = "pls.input.role.name")
    private String roleName;
    @ApiModelProperty("描述")
    private String tips;
    @ApiModelProperty("oms菜单id")
    private List<Long> omsMenuIds;
    @ApiModelProperty("omp菜单id")
    private List<Long> ompMenuIds;
    @ApiModelProperty("wms菜单id")
    private List<Long> wmsMenuIds;

    public List<Long> getOmsMenuIds() {
        if (omsMenuIds == null) return new ArrayList<>();
        return omsMenuIds;
    }

    public List<Long> getOmpMenuIds() {
        if (ompMenuIds == null) return new ArrayList<>();
        return ompMenuIds;
    }

    public List<Long> getWmsMenuIds() {
        if (wmsMenuIds == null) return new ArrayList<>();
        return wmsMenuIds;
    }
}
